package com.proposition.commons.exam.result;

/**
 * @Author: 陈玉林
 * @Description: 包装结果
 * @Date: Create In 16:43 2017/8/10
 * @ModifiedBy:
 */
public class Result<T> {
    private Integer code;//状态码
    private String msg;//提示信息
    private T data;//具体内容

    public Result() {

    }
    public Result(ResultEnum resultEnum,T data) {
        this.code = resultEnum.getCode();
        this.msg = resultEnum.getMsg();
        this.data = data;
    }
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "Result{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }
}
